<#include "*/component/CombineFieldTags.ftl"/>
<@Title>
</@Title>
<@ClassAnnotation>
@Data
@SqlTarget(target = "${entity.table.name } ${entity.table.alias}")
@SqlTableAlias(alias = "${entity.table.alias}")
</@ClassAnnotation>
<@Class>

    <#list entity.fields as field>
        <@Field field=field useSwagger= false>
${'\t'}@SqlColumn(name = "${field.column.name}"<#if field.column.primaryKey>,updateable = false</#if><#if !field.column.nullable>,setNullable = false</#if>)
        </@Field>
    </#list>
<@CreateTime sql=true/>
<@UpdateTime sql=true/>

${'\t'}@SqlTableAlias(aliasFromClass = ${clazz.name}.class)
${'\t'}public static class IDCondition extends NotDeleteCondition {
${'\t'}${'\t'}/**
${'\t'}${'\t'}* 主键
${'\t'}${'\t'}*/
${'\t'}${'\t'}@SqlColumn(name = "id")
${'\t'}${'\t'}@SqlCondition(nullable = false)
${'\t'}${'\t'}private Long id;

${'\t'}${'\t'}public IDCondition(Long id) {
${'\t'}${'\t'}${'\t'}this.id = id;
${'\t'}${'\t'}}
${'\t'}}

</@Class>